using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;

namespace LifeChess.Menu
{
    public class Screen : MonoBehaviour
    {
        [SerializeField]
        private UnityEvent onScreenEnter;
        [SerializeField]
        private UnityEvent onScreenLeave;

        private Button backButton;

        public void Show()
        {
            gameObject.SetActive(true);
            onScreenEnter?.Invoke();
        }

        public void Hide()
        {
            onScreenLeave?.Invoke();
            gameObject.SetActive(false);
        }

        public Button GetBackButton()
        {
            return backButton;
        }
    }
}
